﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using MyCode.Application;
using MyCode.Tools;

namespace MyCode.Web.Controllers
{
    public class LoginController : BaseController
    {
        public ISys_User sys_User { get; set; }
        public IActionResult Index()
        {
            return View();
        }
        /// <summary>
        /// 登陆方法
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        public IActionResult Login(string userName, string passWord)
        {
            var key = HttpContext.Session.Id;
            var data = sys_User.SysUserLogin(userName, passWord);
            return Content(data.ToJson());
        }
    }
}